#ifndef _TBDATETIME_H_
#define _TBDATETIME_H_

#include "TBString2.h"

#include <time.h>

namespace tb
{

	class DateTime
	{
	
	public:
	
		DateTime();
		DateTime(unsigned int a_Year, unsigned int a_Month, unsigned int a_Day);
		DateTime(unsigned int a_Year, unsigned int a_Month, unsigned int a_Day, unsigned int a_Hour, unsigned int a_Minute, unsigned int a_Second);
		~DateTime();

		/*
			Y    = 1-digit year (1 - 9)
			YY   = 2-digit year (01 - 09)
			YYYY = 4-digit year (2001 - 2009)
			M    = 1-digit month (1 - 12)
			MM   = 2-digit month (01 - 12)
			D    = 1-digit day of the month (1 - 31)
			DD   = 2-digit day of the month (01 - 31)
			W    = 1-digit day of the week (1 - 7)
			WW   = 2-digit day of the week (01 - 07)

			h    = 1-digit hour (0 - 23)
			hh   = 2-digit hour (00 - 23)
			u    = 1-digit AM/PM hour (0 - 12)
			uu   = 2-digit AM/PM hour (00 - 12)
			s    = 1-digit second (0 - 59)
			ss   = 2-digit second (00 - 59)
		*/
		String GetFormatted(const String& a_Format) const;
	
	protected:

		time_t m_Time;
		tm m_TimeData;

	}; // class DateTime

}; // namespace tb
	
#endif